package cn.colins.raft.rpc.future;


import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;

import java.util.concurrent.Future;
import java.util.concurrent.TimeoutException;

public interface RpcWriteFuture<R, T> extends Future<R> {

    <R> R write(Channel channel, T easyRpcRequest) throws TimeoutException, InterruptedException;

    void setResponse(R response);

    R getResponse();

    boolean isTimeout();

    long getTimeout();

}
